package org.common.strategy1.Impl;

/**
 * ClassName: WxPayStrategy
 * Package: org.common.strategy.Impl
 * Description:
 *
 * @Author: @weixueshi
 * @Create: 2024/7/19 - 21:39
 * @Version: v1.0
 */

import org.common.strategy1.Factory;
import org.common.strategy1.StrategyFactory;
import org.springframework.stereotype.Component;

/**
 * 支付宝支付策略
 */
@Component
public class AliPayStrategy implements StrategyFactory {
    @Override
    public void pay(String payType) {
        //具体支付实现逻辑
        System.out.println("支付宝支付");
    }

    /**
     * 注册支付宝支付策略方法
     * @throws Exception
     */
    @Override
    public void afterPropertiesSet() throws Exception {
        Factory.register("aliPay",this);
    }
}
